package com.atguigu.boot.controller;

import org.springframework.web.bind.annotation.*;

/**
 * @Author: LDeng
 * @Date: 2021-08-25 12:50

 */
@RestController
public class HelloController {

    @RequestMapping("/1.jpg")
    public String hello(){


        return "aaa";
    }

    @RequestMapping(value = "/user",method = RequestMethod.GET)
    @GetMapping("/user")
    public String getUser(){

        return "GET-张三";
    }

    @RequestMapping(value = "/user",method = RequestMethod.POST)
    @PostMapping("/user")
    public String saveUser(){
        return "POST-张三";
    }


   // @RequestMapping(value = "/user",method = RequestMethod.PUT)
    @PutMapping("/user")
    public String putUser(){

        return "PUT-张三";
    }

  //  @DeleteMapping("/user")
    @RequestMapping(value = "/user",method = RequestMethod.DELETE)
    public String deleteUser(){
        return "DELETE-张三";
    }


}
